'''元组操作'''
t = (1,2,3,4)
t = ()
t = tuple()
t = tuple(range(1,10))
#排序---sort，永久性排序
#sorted，临时性排序

L = [4,6,2,7,9,3,2,0,1]
t = (4,6,2,7,9,3,2,0,1)
# print(L.sort())
# print(L)
# print(t.sort())

print(sorted(L))
print(L)

print(sorted(t))#将排序之后的元素以列表的形式返回
print(t)#原元组未发生变化

#当需要排序的序列的元素类型不全是数值类型，如何排序呢？
L1 = [2,6,1,"abc","fgsds"]
L2 = ["34","a565","7654","abd"]
t1 = (2,6,1,"abc","fgsds")
t2 = ("34","a565","7654","abd")
#倒叙
L1.reverse()
#从大到小
L.sort(reverse=True)

